package org.blackcat.service;

import org.blackcat.domain.common.MsgResponse;

import org.blackcat.domain.User;
import org.springframework.stereotype.Service;

/**
 * Created by Duo Duo on 2016/12/23.
 */
@Service
public interface UserService {
    /**
     * 判断账号是否存在
     * @param account
     * @return
     */
    MsgResponse<Object> existsAccount(String account);
    /**
     * 注册用户
     * @param user
     * @return
     */
    MsgResponse<User> create(User user) throws Exception;
    /**
     * 登录
     * @param account
     * @return
     */
    MsgResponse<User> findByAccount(String account,String password) throws Exception;
    /**
     * 修改用户信息
     */
    MsgResponse<Object> update(User user,String token) throws Exception;
}
